#include "clipboard.h"

ClipBoard::ClipBoard(QObject *parent) :
    QObject(parent)
{
     clipboard = QApplication::clipboard();
}

void ClipBoard::copy(QVariant text)
{
//    clear();        //Clear the clipboard before copy
    qDebug() << "Copy to ClipBoard : " << text.toString();
    clipboard->setText(QString(text.toString()));        //Copy to the system ClipBoard
}
void ClipBoard::clear()
{
    clipboard->clear(QClipboard::Clipboard);
}
